import { HashRouter } from 'react-router-dom'
import RouteView from '/@/wms/router/router-view.tsx'
import { GlobalContext } from '@zoom-design/zoom-design-demo'
import { useState } from 'react'
import { SizeType } from 'antd/es/config-provider/SizeContext'

function App() {
  const [language, setLanguage] = useState('zh')
  const [themeX, setThemeX] = useState<'dark' | 'light' | string>('light')
  const [size,setSize] = useState<SizeType>('middle')
  return (
    <>
      {/*<>{t('中文')}</>*/}
      <GlobalContext.Provider
        value={{
          language: language,
          setLanguage: setLanguage,
          themeX: themeX,
          setThemeX: (t: 'dark' | 'light' | string) => setThemeX(t),
          size:size,
          setSize:(s:SizeType)=>setSize(s)
        }}>
        <HashRouter basename={'/'}>
          <RouteView />
        </HashRouter>
      </GlobalContext.Provider>

      {/*<Layout />*/}
    </>
  )
}

export default App
